<extend name="Public/publicHTML" />
<block name='content'>
    <div class="container-fluid">
        <div class="pull-right">
            <a href="javascript:history.go(-1);" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
        </div>
        <div class="panel panel-default">
            <div class="panel-body ">
                <!--表单数据-->
                <form method="post" id="handlepost" action="">
                    <!--通用信息-->
                    <div class="tab-content col-md-10">
                        <div class="tab-pane active" id="tab_tongyong">
                            <table class="table table-bordered">
                                <tbody>
                                <tr>
                                    <td>Token：</td>
                                    <td >
                                        <input type="text" class="form-control" name="w_token" value="{$data.w_token}" required />
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-sm-2">公众号名称：</td>
                                    <td class="col-sm-8 ">
                                        <input type="text" class="form-control" name="wxname" value="{$data.wxname}" required />
                                        <span id="err_attr_name" style="color:#F00; display:none;"></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td>公众号原始id：</td>
                                    <td >
                                        <input type="text" class="form-control" name="wxid" value="{$data.wxid}" required />
                                    </td>
                                </tr>
                                <tr>
                                    <td>微信号：</td>
                                    <td >
                                        <input type="text" class="form-control" name="weixin" value="{$data.weixin}" required />
                                    </td>
                                </tr>

                                <tr>
                                    <td>头像地址：</td>
                                    <td >
                                        <input type="text" id="headerpic" class="form-control" name="headerpic" value="{$data.headerpic}" required />
                                        <input onclick="Tool.uploadify('{:C('upload_url')}/uploadNum/1/path/class/input/image/config/class_image_conf');" type="button" value="上传头像"/>

                                    </td>
                                </tr>
                                <tr>
                                    <td>AppID：</td>
                                    <td >
                                        <input type="text" class="form-control" name="appid" value="{$data.appid}" required />
                                    </td>
                                </tr>
                                <tr>
                                    <td>AppSecret：</td>
                                    <td >
                                        <input type="text" class="form-control" name="appsecret" value="{$data.appsecret}" required />
                                    </td>
                                </tr>
                                <tr>
                                    <td>二维码：</td>
                                    <td >
                                        <input type="text" class="form-control" id="qr" name="qr" value="{$data.qr}" required />
                                        <input onclick="Tool.uploadify('{:C('upload_url')}/uploadNum/1/path/class/input/image/config/class_image_conf');" type="button" value="上传头像"/>

                                    </td>
                                </tr>

                                <tr>
                                    <td>微信号类型：</td>
                                    <td >
                                        <select name="type">
                                            <foreach name="types" key="key" item="value">
                                                <option <if condition="$key eq $data['type']">selected</if> value="{$key}">{$value}</option>
                                            </foreach>
                                        </select>
                                    </td>
                                </tr>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <td></td>
                                    <td class="text-right"><input class="btn btn-primary" type="button" onclick="do_wechat.post_ajax('handlepost',wechat_url);" value="保存"></td></tr>
                                </tfoot>
                            </table>
                        </div>
                    </div>
                </form><!--表单数据-->
            </div>
        </div>
    </div>

    <link rel="stylesheet" href="__COMMON__/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet" href="__COMMON__/bootstrap/css/font-awesome.min.css" />
    <script type="text/javascript" src="__COMMON__/js/jquery-form.js"></script>
    <script type="text/javascript" src="__COMMON__/js/alert.js?a={:time()}"></script>
    <script type="text/javascript" src="__JS__/user/approval.js?a={:time()}"></script>
    <script type="text/javascript" src="__PUBLIC__/admin/js/wechat/do.js"></script>

    <script>
        var wechat_url = "{:U('WeChat/save_config')}";
    </script>
</block>